<script language="javascript">
$(function(){
	$('#custom_datagrid').datagrid();
});
function userSearch(){
	$('#custom_datagrid').datagrid('options').pageNumber=1;
	$('#custom_datagrid').datagrid('getPager').pagination({pageNumber:1});
	$('#custom_datagrid').datagrid('reload', {name:$('#custom_names').val() });
}
</script>
<div class="searchbox" style=" border-bottom:1px solid #ccc; background:#f9f9f9; line-height:30px; padding-left:5px;">
<div class="toolbar" style="background:none; border:none; padding-left:0px;">
客户名称：
<input type="text" value="" id="custom_names" style="width:150px; line-height:20px; border:1px solid #8696B0;" />
<a href="#" class="easyui-linkbutton" onclick="javascript:userSearch();">搜索</a>
</div>
</div>
<div id="custom_box" title="选择客户" style="width:630px; overflow:hidden; padding-top:5px;">
<table id="custom_datagrid" width="630" url="{:U('User/custom_lst')}" pagination="true" striped="true" singleSelect="true"  idField="custom_id">
    <thead>
        <tr>
            <th field="custom_id" width="50" sortable="true" checkbox="true">ID</th>
            <th field="name" width="200" sortable="true">客户名称</th>
            <th field="createtime" width="120" sortable="true" align="left">添加时间</th>
            <th field="sort" width="100" sortable="true" align="left">排序</th>
            <th field="remark" width="150">备注</th>
        </tr>
    </thead>
</table>
</div>